package org.kailu.book.entity;
// default package
// Generated Jun 2, 2014 10:09:11 AM by Hibernate Tools 4.0.0

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Proxy;

/**
 * ExportBookDetails generated by hbm2java
 */
@Entity
@Proxy(lazy=false)
@Table(name = "export_book_details", catalog = "book")
public class ExportBookDetailsEntity implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer id;
	private BookEntity book;
	private ExportEntity export;
	private int quantity;

	public ExportBookDetailsEntity() {
	}

	public ExportBookDetailsEntity(int quantity) {
		this.quantity = quantity;
	}

	public ExportBookDetailsEntity(BookEntity book, ExportEntity export, int quantity) {
		this.book = book;
		this.export = export;
		this.quantity = quantity;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "book_id")
	public BookEntity getBook() {
		return this.book;
	}

	public void setBook(BookEntity book) {
		this.book = book;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "export_id")
	public ExportEntity getExport() {
		return this.export;
	}

	public void setExport(ExportEntity export) {
		this.export = export;
	}

	@Column(name = "quantity", nullable = false)
	public int getQuantity() {
		return this.quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

}
